package com.vcc.service.service;


import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.vcc.data.entity.Cardholder;
import com.vcc.data.entity.Role;
import com.vcc.service.client.dto.cardholder.ClientCardholderCreateRequest;
import com.vcc.service.client.dto.cardholder.UpdateCardholderDto;
import com.vcc.service.client.dto.cardholder.UpdateCardholderStatusDto;
import com.vcc.service.client.vo.cardholder.CardholderVo;

import java.util.List;


public interface CardholderService extends IService<Cardholder> {

    Cardholder getById(Long id);

    Page<Cardholder> paging(Page<Cardholder> pageable, Long targetUserId, Long id);

    Page<CardholderVo> paging(Long userId, Role role, Long targetUserId, Page<CardholderVo> pageable, Long id, String fistName, Integer status, String startDate, String endDate);

    Boolean updateStatus(UpdateCardholderStatusDto updateCardholderStatusDto);

    Cardholder createCardholder(Long userId, ClientCardholderCreateRequest clientCardholderCreateRequest);

    Boolean updateCardholder(Long userId, UpdateCardholderDto updateCardholderDto);

    List<Cardholder> listByFistNameAndUserId(Long userId, String fistName);

    List<Cardholder> listByEmailAndUserId(Long userId, String email);

    List<Cardholder> listByUserId(Long userId, Integer status);

    public Boolean existsFirstNameByUserId(String fistName, Long userId);

    public Boolean existsLastNameByUserId(String lastName, Long userId);

    public Boolean existsEmailByUserId(String email, Long userId);

    public Boolean existsPhoneByUserId(String phone, Long userId);

    Cardholder getByEmail(String email);


}
